namespace JamesKovacs.Examples.ContractManager {
	/// <summary>
	/// Strategy for recognizing all revenue immediately.
	/// </summary>
	public class CompleteRecognitionStrategy: RecognitionStrategy  {
		#region Constructors
		/// <summary>
		/// Creates a new <see cref="CompleteRecognitionStrategy"/> instance.
		/// </summary>
		public CompleteRecognitionStrategy() {
		}
		#endregion

		#region Overrides
		/// <summary>
		/// Calculates the revenue recognitions for a contract.
		/// </summary>
		/// <param name="contract">Contract on which to recognize revenues.</param>
		public override void CalculateRevenueRecognitions(Contract contract) {
			contract.AddRevenueRecognition(new RevenueRecognition(contract.Revenue, contract.SigningDate));
		}
		#endregion
	}
}
